\newpage
\section{Integrals and antiderivatives}

\subsection{Definition of integral}
The integral of a function $f$ between the interval $[a,b]$ is a new function that that returns the sum of the infinitesimal areas between the points $a$ and $b$. Formerly, this is the Riemann sum, which is a method to approximate the area underneath a function by knowing the function. 

\begin{equation*}
S = \sum_{i=1}^{n} f(x_i)\, \Delta x
\end{equation*}

The integral is the limit of this sum when the difference between the adjacent points ($\Delta x= x_{i}-x_{(i-1)}$) is infinitesimally small ($dx$).

A definite integral is given when the limits of the interval are provided. The result of this expression is commonly given by the area under the curve.

\begin{equation*}
\int_a^b  f(x) \, dx 
\end{equation*}

The indefinite integral is simply given by the following expression. 
\begin{equation*}
\int  f(x) \, dx 
\end{equation*}

and this is simply called integral. The result of such expression gives a new function (e.g $h$) whose derivative returns the orginal function $f$. The process of applying an indefinite integral to a function is called \emph{antiderivative}.

\subsection{An example from the physics}
Assume we know a function that behaves as follows:
\begin{equation*}
v(t) = v_0 - kt 
\end{equation*}

This is the velocity function of the falling body, where $v_0$ is the initial velocity, and $k$ is a proportional factor. Note that the slope of this function is the constant $k$ and that this is negative. The rate of change is therefore constant that can be obtaining by differentiation of $v(t)$ with respect to $t$.

\begin{equation*}
{dv(t) \over dt} = - k 
\end{equation*}

This is indeed the acceleration equation as a function of time, that is simply a negative constant $-g$

\begin{equation*}
{dv(t) \over dt} = a(t) = - g 
\end{equation*}

Similarly, if we simply know $a(t)$, we could try to get the velocity equation by calculating the antiderivative of $a(t)$

\begin{equation*}
v(t) = \int a(t) \, dt = \int -g \, dt
\end{equation*}

which gives
\begin{equation*}
v(t) = -gt + C 
\end{equation*}

This contant term $C$ is simply the initial velocity in the previous equation. It is commonly written as:

\begin{equation*}
v(t) = v_0 -gt 
\end{equation*}

We can know calculate the position by the antiderivative of $v(t)$.

\begin{equation*}
x(t) = \int v(t) \, dt = \int (v_0 -gt) \, dt
\end{equation*}

Solving for $x(t)$:
\begin{equation*}
x(t) = v_0t -\frac{1}{2}gt^2 + C
\end{equation*}

Again here, the term $C$ is physically the initial position $x_0$, and then the equation is:

\begin{equation*}
x(t) = x_0 + v_0t -\frac{1}{2}gt^2  
\end{equation*}

